Skip to content

Reject non-terminal ephemeral runner exits#42

Merged
intel352 merged 2 commits into
mainfrom
codex/github-runner-nonterminal-exit-20260630
Jun 30, 2026
Merged

Reject non-terminal ephemeral runner exits#42
intel352 merged 2 commits into
mainfrom
codex/github-runner-nonterminal-exit-20260630

Conversation

@intel352

Copy link
Copy Markdown
Contributor

Summary

  • fail the provider job when run.sh --once exits while the matched GitHub workflow job is still non-terminal
  • preserve workflow run/job ids in the proof for this failure mode
  • add a regression test matching the STG symptom: GitHub job still in_progress, runner process exits cleanly

STG evidence

  • v1.0.21 target workflow run 28454875323 assigned provider-target to ephemeral runner wfc-stg-ghp-linux-260629fabb6f-1509352a8137
  • GitHub runner registration then reported that runner offline and busy while the target job remained in_progress
  • STG workload controller run 28454768006 was cancelled as non-recoverable acceptance evidence

Verification

  • GOWORK=off go test ./cmd/github-actions-runner-job ./internal -run 'EphemeralRunner|RunnerProvider|T915' -count=1
  • GOWORK=off go test -race ./cmd/github-actions-runner-job -count=1
  • GOWORK=off go test ./... -count=1
  • GOWORK=off go build ./cmd/github-actions-runner-job
  • git diff --check

Copilot AI review requested due to automatic review settings June 30, 2026 15:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tightens the ephemeral GitHub Actions runner job driver so the provider job fails when run.sh --once exits cleanly while the matched GitHub workflow job is still non-terminal, and adds a regression test for the observed STG failure mode.

Changes:

  • Detect and fail on clean runner exit when the matched GitHub job is still in_progress (non-terminal), while preserving run/job IDs in the result/proof artifact.
  • Add a regression test covering “runner exits 0, GitHub job remains in_progress” and asserting proof includes workflow run/job IDs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
cmd/github-actions-runner-job/main.go Adds a failure path when the runner exits before the observed GitHub job becomes terminal.
cmd/github-actions-runner-job/main_test.go Adds a regression test that simulates the STG symptom and validates proof retention of run/job IDs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cmd/github-actions-runner-job/main.go Outdated
@intel352
intel352 merged commit cf1b4cf into main Jun 30, 2026
5 checks passed
@intel352
intel352 deleted the codex/github-runner-nonterminal-exit-20260630 branch June 30, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants